package com.sinog.alarm.service.impl;

import com.sinog.alarm.mapper.db1.AlarmCodeMapper;
import com.sinog.alarm.model.Alarm;
import com.sinog.alarm.model.LocalCode;
import com.sinog.alarm.service.AlarmInsertService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @desc 将数据警告信息插入数据排查表中
 * @author lk
 * @date 2022-02-18 14:55
 */
@Slf4j
@Service
public class AlarmInsertServiceImpl implements AlarmInsertService {

    @Autowired
    private AlarmCodeMapper alarmCodeMapper;

    /**
     * 描述
     * @param alarm alarm
     */
    @Override
    public void insertAlarm(Alarm alarm) {
        alarmCodeMapper.insertAlarm(alarm);
    }

    /**
     * 描述
     * @param localCode localCode
     */
    @Override
    public void deleteAlarmResons(LocalCode localCode) {
        alarmCodeMapper.deleteAlram(localCode);
    }
}